package com.rico.deploy.entity;


import lombok.Data;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import java.text.SimpleDateFormat;
import java.util.Date;

@Data
@Table(name = "user_login_log")
public class UserLoginLog {

  @Column(name = "id")
  @Id
  private Integer id;

  @Column(name = "username")
  private String username;

  @Column(name = "login_time")
  private String loginTime;

  public UserLoginLog(String username) {
    this.username = username;
    this.loginTime = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date());
  }
}
